//
//  STProDetailCell.m
//  YiYueHairdresser
//
//  Created by zhouzhouzhou on 2018/10/11.
//  Copyright © 2018年 YuYiLian. All rights reserved.
//

#import "STProDetailCell.h"
#import "SWHairProsModel.h"
@implementation STProDetailCell

- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        // 初始化时加载collectionCell.xib文件
        NSArray *arrayOfViews =
        [[NSBundle mainBundle] loadNibNamed:@"STProDetailCell"
                                      owner:self
                                    options:nil];
        
        self = [arrayOfViews objectAtIndex:0];
    }
    self.backgroundColor = UIColor.groupTableViewBackgroundColor;
    return self;
}

-(void)setOwnCollectionCellWithData:(id)data{

    if ([data isKindOfClass:[SWHairProsModel class]]) {
        
        SWHairProsModel *model = (SWHairProsModel *)data;
        
        [_headImg sd_setImageWithURL:model.opusPaths.count > 0?model.opusPaths[0]:@"" placeholderImage:[UIImage imageNamed:@"my_portrait_notadded"]];
        _nameLab.text = model.describe;
        _collectionLab.text = model.collection;
        _transLab.text = model.reposted;
        _seeLab.text = model.pageview;
    }
}

@end
